<template>
  <div class="g-body">
    <div class="m-header">
      <div class="m-title">
        {{ information[0].title }}<span class="f-small">{{ information[0].tips }}</span>
      </div>
      <div class="m-tab f-flex f-between">
        <van-button
          v-for="item in contentList"
          :key="item.id"
          @click="fnContentChoice(item)"
          type="default"
          class="u-button"
          >{{ item.content }}</van-button
        >
      </div>
    </div>
    <div class="m-center" v-if="information[1]">
      <div class="m-title">
        {{ information[1].title }} <span class="f-small"> {{ information[1].tips }}</span>
      </div>
      <div class="m-tab f-flex f-between">
        <van-button
          v-for="item in interestList"
          :key="item.id"
          @click="fnInterestChoice(item)"
          type="default"
          class="u-button"
          >{{ item.content }}</van-button
        >
      </div>
    </div>
    <div class="m-division"></div>
    <div class="m-bottom">
      <van-button @click="fnCancel" type="default" class="u-button2">取消</van-button>
    </div>
  </div>
</template>

<script>
import { reactive } from '@vue/reactivity'
export default {
  name: 'contentFeedback',
  props: ['contentList', 'interestList', 'information'],
  setup(props, { emit }) {
    function fnCancel() {
      emit('cancelEvent')
    }
    //返回内容反馈选择信息
    function fnContentChoice(item) {
      emit('contentChoice', item)
    }
    //返回我不想看选择信息
    function fnInterestChoice(item) {
      emit('interestChoice', item)
    }
    
    return { fnCancel, fnContentChoice, fnInterestChoice }
  }
}
</script>

<style lang="scss" scoped>
.van-button::before{
    background-color:#1f2022!important;
}
.f-flex {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
}
.f-between {
  justify-content: space-between;
}
.g-body {
  // color: #333333;
  padding-top: 20px;
  .m-header,
  .m-center {
    color: #e7e8ea;
    padding: 0 20px 0 20px;
    .m-title {
      margin-bottom: 10px;
      font-size: 14px;
      .f-small {
        font-size: 12px;
        color: #747880;
      }
    }
    .m-tab {
      width: 100%;
      .u-button {
        width: 45%;
        margin-bottom: 10px;
        height: 34px;
        background: #121212;
        border-color: #747880;
        color: #e7e8ea;
        font-size: 12px;
      }
    }
  }
  .m-division {
    height: 8px;
    background: #020003;
  }
  .m-bottom {
    .u-button2 {
      width: 100%;
      height: 50px;
      border: none;
      background: #121212;
      color: #e7e8ea;
    }
  }
}
</style>
